﻿<%@ Page EnableEventValidation="False" Title="Search for Item" Language="C#" MasterPageFile="~/Pages/user/userMaster.Master" AutoEventWireup="true" CodeBehind="SearchItem.aspx.cs" Inherits="WarehouseWebAPP.Pages.user.Search_Pages.SearchItem" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style13
        {
            height: 23px;
        }
        .style16
        {
        }
        .style17
        {
            width: 12px;
        }
        .style22
        {
            width: 232px;
        }
        .style23
        {
            width: 104px;
        }
        .style24
        {
            width: 74px;
            height: 28px;
        }
        .style25
        {
            width: 88px;
        }
        .style26
        {
            width: 100%;
            position: relative;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style26" style="width: 100%; top: 0px; left: 0px;">
        <tr>
            <td class="style25">
                <asp:Label ID="Label11" runat="server" Text="Serial No."></asp:Label>
            </td>
            <td colspan="1">
                <cc1:ComboBox ID="SerialComboBox" runat="server" AppendDataBoundItems="True" 
                    AutoCompleteMode="Append" DataSourceID="SerialObjectDataSource" 
                    DataTextField="lend_item_serial" DataValueField="lend_item_serial" 
                    MaxLength="0" ondatabound="SerialComboBox_DataBound">
                </cc1:ComboBox>
            </td>
            <td class="style23">
                <asp:Label ID="Label15" runat="server" Text="Vendor"></asp:Label>
            <td>
                <cc1:ComboBox ID="VendorComboBox" runat="server" AppendDataBoundItems="True" 
                    AutoCompleteMode="Append" DataSourceID="VendorObjectDataSource" 
                    DataTextField="vendor_name" DataValueField="vendor_num" 
                    DropDownStyle="DropDownList" MaxLength="0" 
                    ondatabound="VendorComboBox_DataBound">
                </cc1:ComboBox>
            </td>
            </td>
        </tr>
        <tr>
            <td class="style25">
                <asp:Label ID="Label12" runat="server" Text="Description"></asp:Label>
            </td>
            <td class="style24">
                <asp:TextBox ID="DescriptionTextBox" runat="server"></asp:TextBox>
            </td>
            <td class="style23">
                <asp:Label ID="Label16" runat="server" Text="Supplier"></asp:Label>
            </td>
            <td>
                <cc1:ComboBox ID="SupplierComboBox" runat="server" AppendDataBoundItems="True" 
                    AutoCompleteMode="Append" DataSourceID="SupplierObjectDataSource" 
                    DataTextField="supplier_name" DataValueField="supplier_num" 
                    DropDownStyle="DropDownList" MaxLength="0" 
                    ondatabound="SupplierComboBox_DataBound">
                </cc1:ComboBox>
            </td>
        </tr>
        <tr>
            <td class="style25">
                <asp:Label ID="Label13" runat="server" Text="Place"></asp:Label>
            </td>
            <td class="style17">
                <asp:TextBox ID="PlaceTextBox" runat="server"></asp:TextBox>
            </td>
            <td class="style23">
                <asp:Label ID="Label14" runat="server" Text="Is Available"></asp:Label>
            </td>
            <td class="style22">
                <asp:CheckBox ID="AvailableCheckBox" runat="server" Text=" " Checked="True" />
            </td>
        </tr>
        <tr bgcolor="#E3E6EA">
            <td colspan="3">
                &nbsp;</td>
            <td>
            <asp:Button ID="Button1" runat="server" BackColor="#FFFBFF" 
 BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px"  
 Font-Names="Verdana" Font-Size="Small" ForeColor="#284775" Text="Search" Width="76px" 
                    onclick="Button1_Click"/>
            </td>
        </tr>
        <tr>
            <td class="style13" colspan="4">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="ItemGridView" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" CellPadding="4" DataKeyNames="lend_item_num" 
                    DataSourceID="ItemObjectDataSource" ForeColor="#333333" GridLines="None" 
                    ondatabound="ItemGridView_DataBound" Width="600px">
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField DataField="lend_item_num" HeaderText="lend_item_num" 
                            ReadOnly="True" SortExpression="lend_item_num" Visible="False" />
                                <asp:BoundField DataField="lend_item_serial" HeaderText="Serial No." 
                            SortExpression="lend_item_serial" />
                                <asp:CheckBoxField DataField="lend_item_available" 
                            HeaderText="Available" SortExpression="lend_item_available" />
                                <asp:BoundField DataField="lend_item_description" 
                            HeaderText="Description" SortExpression="lend_item_description" />
                                <asp:BoundField DataField="lend_item_place" HeaderText="Place" 
                            SortExpression="lend_item_place" />
                                <asp:TemplateField HeaderText="Supplier" 
                            SortExpression="lend_item_supplier">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" 
                                    Text='<%# Bind("lend_item_supplier") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="SupplierLabel" runat="server" 
                                    Text='<%# Bind("lend_item_supplier") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Vendor" 
                            SortExpression="lend_item_vendor">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" 
                                    Text='<%# Bind("lend_item_vendor") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="VendorLabel" runat="server" 
                                    Text='<%# Bind("lend_item_vendor") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                                HorizontalAlign="Left" />
                            <EditRowStyle BackColor="#999999" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="style13" colspan="4">
                <asp:LinkButton ID="ExcelButton" runat="server" onclick="ExcelButton_Click">LinkButton</asp:LinkButton>
                <asp:ObjectDataSource ID="ItemObjectDataSource" runat="server" 
                    SelectMethod="LendItemSearch" 
                    TypeName="WarehouseWebAPP.code.BLL.LendItemBLL" 
                    OldValuesParameterFormatString="original_{0}">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="SerialComboBox" DefaultValue="%" 
                            Name="lend_item_serial" PropertyName="SelectedValue" Type="String" />
                        <asp:ControlParameter ControlID="VendorComboBox" DefaultValue="%" 
                            Name="lend_item_vendor" PropertyName="SelectedValue" Type="String" />
                        <asp:ControlParameter ControlID="DescriptionTextBox" DefaultValue="%" 
                            Name="lend_item_description" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="PlaceTextBox" DefaultValue="%" 
                            Name="lend_item_place" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="SupplierComboBox" DefaultValue="%" 
                            Name="lend_item_supplier" PropertyName="SelectedValue" Type="String" />
                        <asp:ControlParameter ControlID="AvailableCheckBox" DefaultValue="False" 
                            Name="lend_item_available" PropertyName="Checked" Type="Boolean" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="VendorObjectDataSource" runat="server" 
                    SelectMethod="VendorGet" TypeName="WarehouseWebAPP.code.BLL.VendorBLL">
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="SupplierObjectDataSource" runat="server" 
                    SelectMethod="SupplierGet" TypeName="WarehouseWebAPP.code.BLL.SupplierBLL">
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="SerialObjectDataSource" runat="server" 
                    SelectMethod="lendItemGet" TypeName="WarehouseWebAPP.code.BLL.LendItemBLL">
                </asp:ObjectDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
